/**
 * Author: Shen Yanqiu
 * Date: 2017-12-20
 * Time: 19:21
 *
 */
import React from 'react';
import { Badge } from 'antd';
import styles from './CustomTooltip.less';

class CustomTooltip extends React.Component{
  render() {
    const { active } = this.props;
    if (active) {
      const { payload, label } = this.props;
      return (
        <div className={styles.customTooltip}>
          <p className="label">{`${payload[0].payload.time}`}</p>
          <p>
            <Badge status="processing" text={`${payload[0].value}`} />
          </p>
        </div>
      );
    }

    return null;
  }
}
export default CustomTooltip;
